package year2019.month0234;

/**
 * @desc 描述
 * create on 2019/4/25 by watson
 */
public class TestGC {

    public static void main(String[] args){
        Book book = new Book(true);
//        book.checkIn();
        new Book(true);
        System.gc();
    }

}

class Book{
    private boolean checkOut;
    public Book(boolean check){
        checkOut = check;
    }
    public void checkIn(){
        checkOut = false;
    }
    protected void finalize(){
        if (checkOut) System.out.println("Error Check");
    }
}
